#ifndef LIST
#define LIST

#include <stdio.h>
#include<string.h>
#include<stdlib.h>


#define BOOL int
#define TRUE 1
#define FALSE 0

typedef struct data Data;
typedef struct node *Node;
typedef struct list *List;
typedef struct pollresults PollResults;

struct data
{
	char username[125];
	BOOL vote;
};

struct pollresults
{
	int yes;
	int no;
};

struct node
{
	Node next;
	Data data;
};

struct list
{
	PollResults pollResults;
	char filename[125];
	Node start;
	int size;
};

List Create ( char *filename );
BOOL Insert ( List list, char *username, BOOL vote );
BOOL Exists ( List list, char *username );
void Flush ( List list );
PollResults GetPollResults ( List list, PollResults *pollResults );

#endif
